/****************************************************
          File Name:loop_array_queue.c
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Mon 09 Feb 2015 10:32:14 PM CST
*****************************************************/

#include<stdio.h>
#include<stdlib.h>
#include"loop_array_queue.h"

int main(int argc, char *argv[])
{
    Queue q;
    mydata data;

    InitQueue(&q);

    printf("enqueue\n");
    printf("enter a number: ");
    scanf("%d", &data);
    if(!EnQueue(&q, data))
    {
        printf("Enqueue failed\n");
        exit(1);
    }

    printf("dequeue\n");
    mydata tmp;
    if(!DeQueue(&q, &tmp))
    {
        printf("Dequeue failed\n");
        exit(1);
    }
    printf("\t\t%d\n", tmp);

    return 0;
}
